<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <table>
        <thead>
            <tr>
                <!-- <th>序号</th> -->
                <th>姓名</th>
                <th>年龄</th>
                <th>性别</th>
                <th>爱好</th>
            </tr>
        </thead>
        <tbody id="tb">
            <!-- <tr>
               
                <td>陈某某</td>
                <td>17</td>
                <td>女</td>
                <td>敲代码</td>
            </tr>
            <tr>
              
                <td>陈某某</td>
                <td>17</td>
                <td>女</td>
                <td>敲代码</td>
            </tr> -->
        </tbody>
    </table>

    <script>

        var data = [
            ['陈某某' , '17' , '女' , '敲代码'] ,
            ['陈某某2' , '17' , '女' , '敲代码'] ,
            ['陈某某3' , '17' , '女' , '敲代码'] ,
            ['陈某某4' , '17' , '女' , '敲代码'] 
        ]


        var res = '' ;
        for(var i = 0 ; i < data.length ; i++) {
            res += '<tr>' ;
            // 拼接4个td
            for(var j = 0 ; j < data[i].length ; j++) {
                res += '<td>' + data[i][j] + '</td>' ;
            }
            res += '</tr>' ;
        }

        console.log(res);

        var oTb = document.getElementById('tb') ;
        oTb.innerHTML = res ;


    </script>
    
</body>
</html>